﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rock
{
    //随机出拳，保存在属性中
    public class Computer
    {
        public EmunFist Fist
        {
            get;
            set;
        }
        public EmunFist ShowFist()
        {
            Random rnd = new Random();
            int rNum = rnd.Next(1, 4);
            switch (rNum)
            {
                case 1: 
                    this.Fist=  EmunFist.石头;
                    break;
                case 2:
                    this.Fist = EmunFist.剪刀;
                    break;
                case 3:
                    this.Fist = EmunFist.布;
                    break;
            }
            return (EmunFist)rNum;

        }
    }
}

